cmake_minimum_required(VERSION 3.14)

project(raise_up_desktop LANGUAGES CXX)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Widgets REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Widgets REQUIRED)
find_package(KF${QT_VERSION_MAJOR}WindowSystem REQUIRED)
if (NOT KF${QT_VERSION_MAJOR}WindowSystem_FOUND)
    message(FATAL_ERROR "KF${QT_VERSION_MAJOR}WindowSystem not found!")
endif()

add_executable(raise_up_desktop
  main.cpp
)

target_link_libraries(raise_up_desktop
    Qt${QT_VERSION_MAJOR}::Core
    Qt${QT_VERSION_MAJOR}::Widgets
    KF${QT_VERSION_MAJOR}::WindowSystem
)
